import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'

class Login extends Component {
    login = () => {
        sessionStorage.setItem('token', 'ssss')
        this.props.history.push(this.props.location.goBack)
    }
    render() {
        return (
            <div>
                <button onClick={this.login}>登录</button>
            </div>
        )
    }
}

export default withRouter(Login)
